<script>
    $(document).ready(function(){
        generic.validaForm();
        
        $("#iframeContent").load(function(){
            var myDiv = this.contentWindow.document.getElementsByTagName('div');
            if(myDiv.length>0){
            var idDiv = myDiv[0].getAttribute('id');
            
            var addClase = "";
            
            if(idDiv == 'asd'){
                addClase = "alert alert-danger";
            }else{
                addClase = "alert alert-success";
                generic.limpiaInputs();
            }
            textError = $(myDiv[0]).html();
            (textError!='')?function(){
                $('#contentFrame').html(textError).addClass(addClase).css("height", '48px');    
           }()
           :function(){
            $('#contentFrame').removeClass(addClase).empty().css("height", '0px');;
           }();
        }
        
    });
  });
</script>
<div id="contentFrame"></div>
<div class="well" style="margin: 0px;">
	<form id="myForm" name="myForm" action="modules/newUser.php" method="POST" target="response" class="bs-example form-horizontal">
		<fieldset>
			<legend>Cuestionarios</legend>
			<div class="form-group">
				<label for="txtCuestionario" class="col-lg-2 control-label">Descripción</label>
				<div class="col-lg-10">
					<textarea id="txtCuestionario" name="txtCuestionario" class="form-control" rows="3" ></textarea>
				</div>
			</div>
			<div class="form-group">
				<div class="col-lg-10 col-lg-offset-2" style="text-align: right;">
					<button type="submit" name="btnGuardaCuestionario" class="btn btn-primary">Guardar</button>
				</div>
			</div>
		</fieldset>
	</form>
</div>
<iframe id="iframeContent" name ="response" style="display:none;"></iframe>